package com.example.victory.swagger.model;

import java.util.Objects;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.validation.annotation.Validated;
import javax.validation.Valid;

/**
 * 用户基本信息
 */
@ApiModel(description = "用户基本信息")
@Validated
@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2021-04-26T10:50:39.083+08:00")

public class ApiRequestCustomersPageData   {
  @JsonProperty("pageSize")
  private Integer pageSize = null;

  @JsonProperty("index")
  private Integer index = null;

  /**
   * 排序名称，默认，或总资产，或可用资产，或周转率，或开户日期，或月佣金，或季佣金
   */
  public enum SortByEnum {
    DEFAULT("DEFAULT"),
    
    TOTAL("TOTAL"),
    
    AVAILABLE_TOTAL("AVAILABLE_TOTAL"),
    
    TURNOVER_RATE("TURNOVER_RATE"),
    
    OPER_DATE("OPER_DATE"),
    
    MYJ_BY("MYJ_BY"),
    
    MYJ_J3Y("MYJ_J3Y");

    private String value;

    SortByEnum(String value) {
      this.value = value;
    }

    @Override
    @JsonValue
    public String toString() {
      return String.valueOf(value);
    }

    @JsonCreator
    public static SortByEnum fromValue(String text) {
      for (SortByEnum b : SortByEnum.values()) {
        if (String.valueOf(b.value).equals(text)) {
          return b;
        }
      }
      return null;
    }
  }

  @JsonProperty("sortBy")
  private SortByEnum sortBy = null;

  /**
   * 排序方向，升序或降序
   */
  public enum SortDirectionEnum {
    ASC("ASC"),
    
    DESC("DESC");

    private String value;

    SortDirectionEnum(String value) {
      this.value = value;
    }

    @Override
    @JsonValue
    public String toString() {
      return String.valueOf(value);
    }

    @JsonCreator
    public static SortDirectionEnum fromValue(String text) {
      for (SortDirectionEnum b : SortDirectionEnum.values()) {
        if (String.valueOf(b.value).equals(text)) {
          return b;
        }
      }
      return null;
    }
  }

  @JsonProperty("sortDirection")
  private SortDirectionEnum sortDirection = null;

  @JsonProperty("filter")
  private CustomerFilter filter = null;

  public ApiRequestCustomersPageData pageSize(Integer pageSize) {
    this.pageSize = pageSize;
    return this;
  }

  /**
   * 分页查询的一页记录数，默认为20
   * @return pageSize
  **/
  @ApiModelProperty(example = "20", value = "分页查询的一页记录数，默认为20")


  public Integer getPageSize() {
    return pageSize;
  }

  public void setPageSize(Integer pageSize) {
    this.pageSize = pageSize;
  }

  public ApiRequestCustomersPageData index(Integer index) {
    this.index = index;
    return this;
  }

  /**
   * 页码数，第一页为0
   * @return index
  **/
  @ApiModelProperty(example = "0", value = "页码数，第一页为0")


  public Integer getIndex() {
    return index;
  }

  public void setIndex(Integer index) {
    this.index = index;
  }

  public ApiRequestCustomersPageData sortBy(SortByEnum sortBy) {
    this.sortBy = sortBy;
    return this;
  }

  /**
   * 排序名称，默认，或总资产，或可用资产，或周转率，或开户日期，或月佣金，或季佣金
   * @return sortBy
  **/
  @ApiModelProperty(example = "DEFAULT", value = "排序名称，默认，或总资产，或可用资产，或周转率，或开户日期，或月佣金，或季佣金")


  public SortByEnum getSortBy() {
    return sortBy;
  }

  public void setSortBy(SortByEnum sortBy) {
    this.sortBy = sortBy;
  }

  public ApiRequestCustomersPageData sortDirection(SortDirectionEnum sortDirection) {
    this.sortDirection = sortDirection;
    return this;
  }

  /**
   * 排序方向，升序或降序
   * @return sortDirection
  **/
  @ApiModelProperty(value = "排序方向，升序或降序")


  public SortDirectionEnum getSortDirection() {
    return sortDirection;
  }

  public void setSortDirection(SortDirectionEnum sortDirection) {
    this.sortDirection = sortDirection;
  }

  public ApiRequestCustomersPageData filter(CustomerFilter filter) {
    this.filter = filter;
    return this;
  }

  /**
   * Get filter
   * @return filter
  **/
  @ApiModelProperty(value = "")

  @Valid

  public CustomerFilter getFilter() {
    return filter;
  }

  public void setFilter(CustomerFilter filter) {
    this.filter = filter;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ApiRequestCustomersPageData apiRequestCustomersPageData = (ApiRequestCustomersPageData) o;
    return Objects.equals(this.pageSize, apiRequestCustomersPageData.pageSize) &&
        Objects.equals(this.index, apiRequestCustomersPageData.index) &&
        Objects.equals(this.sortBy, apiRequestCustomersPageData.sortBy) &&
        Objects.equals(this.sortDirection, apiRequestCustomersPageData.sortDirection) &&
        Objects.equals(this.filter, apiRequestCustomersPageData.filter);
  }

  @Override
  public int hashCode() {
    return Objects.hash(pageSize, index, sortBy, sortDirection, filter);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ApiRequestCustomersPageData {\n");
    
    sb.append("    pageSize: ").append(toIndentedString(pageSize)).append("\n");
    sb.append("    index: ").append(toIndentedString(index)).append("\n");
    sb.append("    sortBy: ").append(toIndentedString(sortBy)).append("\n");
    sb.append("    sortDirection: ").append(toIndentedString(sortDirection)).append("\n");
    sb.append("    filter: ").append(toIndentedString(filter)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }
}

